What is an RSS Feed?
An RSS feed is a feed of posts created using the RSS technology. It's a file available via a URL that an RSS client can download to "subscribe" to that RSS feed. A single website may provide several different RSS feeds that you can subscribe to using an RSS client.
For example, it's common for there to be an RSS feed that you can subscribe to to get the latest articles posted on the website. There can also be separate RSS feeds for every single category, tag, or hashtag, that only gives you the latest articles that match these respective criteria. In forum websites, it's possible that every single thread has its own RSS feed you can subscribe to to get notified when there is a new reply to a thread. If a forum has subforums, each subforum has its own RSS feed where the posts are the threads being posted.
When you visit a webpage that has an RSS feed associated to it, web browsers that support RSS feeds may display an icon indicating that there exists an RSS feed version of that webpage. A single webpage may have multiple RSS feeds associated with it.
Some RSS clients can only subscribe to an RSS feed if you give them the feed's URL, which may not even be visible on the webpage. Smarter RSS clients can subscribe to an RSS feed if you give them a webpage URL that has an RSS feed associated with it.
How are RSS Feeds Declared?
Webpage are files containing HTML code. When an RSS feed is found associated with a webpage, what that means is that there's HTML code in the page declaring its RSS feeds. This code would look like this:
<link
rel="alternate"
type="application/rss+xml"
title="Virtual Curiosities » Feed"
href="https://www.virtualcuriosities.com/feed"
>
Normally this would be written as a single line.
In RSS clients that let you choose between multiple declared RSS feeds, the title of the feeds likely come from the value of the title
attribute in the code above.
The URL of the feed is what's written in the href
attribute. This website was created with WordPress, and by default WordPress websites have an RSS feed available at /feed
. Many WordPress website owners don't even know they have a RSS feed because it's set up automatically, and neither do their visitors because they don't place the RSS logo around the website.
It's worth noting that many major social media websites provide RSS feeds. You can, for example, subscribe to a blog on Tumblr, to a user on Bluesky, or even to a subreddit on Reddit using RSS. And these were no accident. They weren't set up automatically. Developers were paid to write the program that generates the RSS feeds in these websites so that people had this method to subscribe to content on their platforms.
What do RSS Feeds Look Like?
RSS feeds are XML code. How the feed looks like exactly depends on the RSS client. Some clients, for example, can display thumbnails if the feed contains images, while others can not. For reference, this is the sort of code that WordPress generates:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel>
<title>Virtual Curiosities</title>
<atom:link href="https://www.virtualcuriosities.com/feed" rel="self" type="application/rss+xml" />
<link>https://www.virtualcuriosities.com</link>
<description>PC Tutorials, Software Reviews, and Virtual Curiosities</description>
<lastBuildDate>Sun, 20 Oct 2024 00:11:21 +0000</lastBuildDate>
<language>en-US</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://wordpress.org/?v=6.4.3</generator>
<item>
<title>RSS</title>
<link>https://www.virtualcuriosities.com/articles/2533/rss-meaning</link>
<comments>https://www.virtualcuriosities.com/articles/2533/rss-meaning#respond</comments>
<dc:creator><![CDATA[Noel Santos]]></dc:creator>
<pubDate>Sat, 19 Oct 2024 23:46:13 +0000</pubDate>
<category><![CDATA[Articles]]></category>
<guid isPermaLink="false">https://www.virtualcuriosities.com/?p=2533</guid>
<description><![CDATA[Technology that allows you to "follow" websites without using a social media platform.]]></description>
<wfw:commentRss>https://www.virtualcuriosities.com/articles/2533/rss-meaning/feed</wfw:commentRss>
<slash:comments>0</slash:comments>
</item>
</channel></rss>
Like all XML files there's an XML declaration at the top together with XML namespaces (xmlns
), then there must be a root node, in this case <rss>
is our root node
A <channel>
(a RSS feed) is declared. It has a title, description, its canonical URL, a link to its respective webpage, language, etc.
Observe that the RSS feed declares when it was last built. RSS clients can keep track of when was the last time they fetched the RSS feed, and if it looks like it's the same feed as before, they can just ignore it because nothing should have changed.
There's also a recommendation for how frequently an RSS client should try to refresh the feed. In this case, it says hourly, once per hour, which honestly is too frequently for this website, so I might look into how to change that later. For example, suppose you had 1000 people subscribe to your RSS, and it had the recommended settings. That means their RSS clients would be hitting your servers once every hour even though you aren't posting anything new once every hour. For small websites, even once per week or month can be enough, just to make sure there is something new posted.
Then you have a list of items, each being an <item>
. This is the posts. Each post has a title, its link, a link to the comments section, the author, published date, category, and even a link to an RSS feed for the comments. It's worth noting that I don't actually use WordPress' built-in categories. I just put everything into an "Articles" category to keep the URL structure consistent. That's another thing I could look into one day: how to insert my custom categories where WordPress' is inserting its built-in ones.
Leave a Reply